﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace League
{
    public class Team
    {
        public string Name { get; set; } // 队名
        public int MatchesPlayed { get; set; } // 比赛场数
        public int Wins { get; set; } // 赢的场数
        public int Draws { get; set; } // 平局场数
        public int Losses { get; set; } // 负的场数
        public int GoalsFor { get; set; } // 进球数
        public int GoalsAgainst { get; set; } // 失球数
        public int Points { get; set; } // 积分

        // 计算净胜球
        public int GoalDifference => GoalsFor - GoalsAgainst;

        // 构造函数
        public Team(string name)
        {
            Name = name;
            MatchesPlayed = Wins = Draws = Losses = GoalsFor = GoalsAgainst = Points = 0;
        }

        // 打印球队信息
        public void PrintInfo()
        {
            Console.WriteLine($"{Name.PadRight(15)} {MatchesPlayed,4} {Wins,4} {Draws,4} {Losses,4} {GoalsFor,4} {GoalsAgainst,4} {GoalDifference,4} {Points,4}");
        }
    }
}
